package ioReview;

import org.junit.Test;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

public class InputStream {
    @Test
    public void test() throws IOException {
        // 创建文件实例
        File file = new File("c:/a.txt");

        //创建输入对象
        FileInputStream is = new FileInputStream(file);

        //输出
        System.out.println(is);

        int b;
        // 循环
        while ((b = is.read()) > 0) {
            System.out.println((char) b);
        }

    }
}
